.class Les/jk$a;
.super Ljava/lang/Object;
.source "KsAdProvider.java"

# interfaces
.implements Lcom/kwad/sdk/api/KsLoadManager$SplashScreenAdListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Les/jk;->a(Landroid/app/Activity;Landroid/view/ViewGroup;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Lcom/estrongs/android/pop/app/ad/cn/AdType;

.field final synthetic b:Lcom/estrongs/android/pop/app/ad/cn/b;

.field final synthetic c:Landroid/view/ViewGroup;

.field final synthetic d:Landroid/app/Activity;

.field final synthetic e:Les/jk;


# direct methods
.method constructor <init>(Les/jk;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;Landroid/view/ViewGroup;Landroid/app/Activity;)V
    .locals 0

    .line 1
    iput-object p1, p0, Les/jk$a;->e:Les/jk;

    iput-object p2, p0, Les/jk$a;->a:Lcom/estrongs/android/pop/app/ad/cn/AdType;

    iput-object p3, p0, Les/jk$a;->b:Lcom/estrongs/android/pop/app/ad/cn/b;

    iput-object p4, p0, Les/jk$a;->c:Landroid/view/ViewGroup;

    iput-object p5, p0, Les/jk$a;->d:Landroid/app/Activity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onError(ILjava/lang/String;)V
    .locals 5

    .line 1
    iget-object v0, p0, Les/jk$a;->e:Les/jk;

    iget-object v1, p0, Les/jk$a;->a:Lcom/estrongs/android/pop/app/ad/cn/AdType;

    iget-object v2, p0, Les/jk$a;->b:Lcom/estrongs/android/pop/app/ad/cn/b;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "ks-splash "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {v0, v1, v2, p1, p2}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    return-void
.end method

.method public onSplashScreenAdLoad(Lcom/kwad/sdk/api/KsSplashScreenAd;)V
    .locals 4
    .param p1    # Lcom/kwad/sdk/api/KsSplashScreenAd;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param

    const/4 v0, -0x1

    if-nez p1, :cond_0

    .line 1
    iget-object p1, p0, Les/jk$a;->e:Les/jk;

    iget-object v1, p0, Les/jk$a;->a:Lcom/estrongs/android/pop/app/ad/cn/AdType;

    iget-object v2, p0, Les/jk$a;->b:Lcom/estrongs/android/pop/app/ad/cn/b;

    const-string v3, "ks-splash result invalid"

    invoke-virtual {p1, v1, v2, v0, v3}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    return-void

    .line 2
    :cond_0
    new-instance v1, Les/jk$a$a;

    invoke-direct {v1, p0}, Les/jk$a$a;-><init>(Les/jk$a;)V

    invoke-interface {p1, v1}, Lcom/kwad/sdk/api/KsSplashScreenAd;->getFragment(Lcom/kwad/sdk/api/KsSplashScreenAd$SplashScreenAdInteractionListener;)Landroidx/fragment/app/Fragment;

    move-result-object p1

    .line 3
    iget-object v1, p0, Les/jk$a;->d:Landroid/app/Activity;

    invoke-virtual {v1}, Landroid/app/Activity;->isDestroyed()Z

    move-result v1

    if-nez v1, :cond_3

    iget-object v1, p0, Les/jk$a;->d:Landroid/app/Activity;

    invoke-virtual {v1}, Landroid/app/Activity;->isFinishing()Z

    move-result v1

    if-eqz v1, :cond_1

    goto :goto_0

    :cond_1
    if-nez p1, :cond_2

    .line 4
    iget-object p1, p0, Les/jk$a;->e:Les/jk;

    iget-object v1, p0, Les/jk$a;->a:Lcom/estrongs/android/pop/app/ad/cn/AdType;

    iget-object v2, p0, Les/jk$a;->b:Lcom/estrongs/android/pop/app/ad/cn/b;

    const-string v3, "ks-splash bad fragment"

    invoke-virtual {p1, v1, v2, v0, v3}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    return-void

    .line 5
    :cond_2
    iget-object v0, p0, Les/jk$a;->d:Landroid/app/Activity;

    check-cast v0, Landroidx/appcompat/app/AppCompatActivity;

    invoke-virtual {v0}, Landroidx/fragment/app/FragmentActivity;->getSupportFragmentManager()Landroidx/fragment/app/FragmentManager;

    move-result-object v0

    .line 6
    invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;

    move-result-object v0

    iget-object v1, p0, Les/jk$a;->c:Landroid/view/ViewGroup;

    .line 7
    invoke-virtual {v1}, Landroid/view/ViewGroup;->getId()I

    move-result v1

    invoke-virtual {v0, v1, p1}, Landroidx/fragment/app/FragmentTransaction;->replace(ILandroidx/fragment/app/Fragment;)Landroidx/fragment/app/FragmentTransaction;

    move-result-object p1

    .line 8
    invoke-virtual {p1}, Landroidx/fragment/app/FragmentTransaction;->commitAllowingStateLoss()I

    return-void

    .line 9
    :cond_3
    :goto_0
    iget-object p1, p0, Les/jk$a;->e:Les/jk;

    iget-object v1, p0, Les/jk$a;->a:Lcom/estrongs/android/pop/app/ad/cn/AdType;

    iget-object v2, p0, Les/jk$a;->b:Lcom/estrongs/android/pop/app/ad/cn/b;

    const-string v3, "ks-splash bad activity"

    invoke-virtual {p1, v1, v2, v0, v3}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    return-void
.end method
